<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
		var	array=[100,45,3,67,20];
		var max=array[0];
		var min=array[0];
		for (var i in array) {
			if (array[i]>max) {
				max=array[i];				
			}
			if (array[i]<min) {
				min=array[i];				
			}
		}
		console.log("数组:"+array);
		
        console.log("最大值max:"+max);
		console.log("最小值min:"+min);

		</script>
	</body>
</html>
